home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.10 / demo / sparx.i / .spark13.i < prev    next >
Text File  |  1995-04-19  |  2KB  |  107 lines

  1.  
  2. Procedure Spark13;
  3. Const
  4.     max4lines : Short = 320;
  5. Type
  6.     Sp1lines    = Array[1..max4lines] of line;
  7.     Sp1LinesPtr = ^Sp1Lines;
  8.  
  9. Var
  10.     arr    : Sp1LinesPtr;
  11.     cnt1,
  12.     cnt2,
  13.     CCNT,
  14.     add1,
  15.     add2,
  16.     actualline : Short;
  17.  
  18. Procedure Inner13Circle;
  19. Begin
  20.       EraseLine( Adr(arr^[actualline]) );
  21.       With arr^[actualline] do begin
  22.         x1 := 170 + XSin^[cnt1] *  6 DIV  5;    { +- max.120 }
  23.         y1 := 110 + XCos^[cnt2] * 11 DIV 10;    { +- max.110 }
  24.         x2 := 160;
  25.         y2 := 128;
  26.       end;
  27.  
  28.       cnt1 := cnt1 + add1;
  29.       if cnt1>627 then cnt1:= cnt1-628;
  30.  
  31.       cnt2 := cnt2 + add2;
  32.       if cnt2>627 then cnt2:= cnt2-628;
  33.  
  34.       DrawLine( Adr(arr^[actualline]), CCNT );
  35.  
  36.       inc( CCNT );
  37.       If CCNT > maxColors then CCNT := 2;
  38. End;
  39.  
  40.  
  41.  
  42. Begin
  43.     New(arr);
  44.     ActualLine := 1;
  45.  
  46.     cnt1 := 46;    add1 := 11;    { x1 }
  47.     cnt2 := 326;    add2 := 31;    { y1 }
  48.     CCNT := 2;    { color }
  49.  
  50.  
  51. { --------------------------- }
  52.     max4lines := 20;
  53.     Repeat
  54.       Inner13Circle;
  55.  
  56.       inc( actualline );
  57.       If actualline >= max4lines then actualline := 1;
  58.     Until LeftMouseButton;
  59.  
  60.     Repeat
  61.     until NOT Leftmousebutton;
  62.     Delay(4);
  63.  
  64. { --------------------------- }
  65.     max4lines := 40;
  66.     Repeat
  67.       Inner13Circle;
  68.  
  69.       inc( actualline );
  70.       If actualline >= max4lines then actualline := 1;
  71.     Until LeftMouseButton;
  72.  
  73.     Repeat
  74.     until NOT Leftmousebutton;
  75.     Delay(4);
  76.  
  77. { --------------------------- }
  78.     max4lines := 160;
  79.     Repeat
  80.       Inner13Circle;
  81.  
  82.       inc( actualline );
  83.       If actualline >= max4lines then actualline := 1;
  84.     Until LeftMouseButton;
  85.  
  86.     Repeat
  87.     until NOT Leftmousebutton;
  88.     Delay(4);
  89.  
  90. { --------------------------- }
  91.     max4lines := 320;
  92.     Repeat
  93.       Inner13Circle;
  94.  
  95.       inc( actualline );
  96.       If actualline >= max4lines then actualline := 1;
  97.     Until LeftMouseButton;
  98.  
  99. { --------------------------- }
  100.  
  101.  
  102.     Ciao;
  103.     Dispose(arr);
  104.     SetSColors(Adr(Def_Colors));
  105. End;
  106.  
  107.